package com.jy.wms.common.base;

/**
 * 数字计算方法
 */
public class NumberProcessing {

    /**
     * 字符长度不足补0
     * @param str
     * @param strLength
     * @return
     */
    public static String addZeroForNum(String str,int strLength) {
        int strLen =str.length();
        if (strLen <strLength) {
            while (strLen< strLength) {
                StringBuffer sb = new StringBuffer();
                sb.append("0").append(str);//左补0
                str= sb.toString();
                strLen= str.length();
            }
        }

        return str;
    }
}
